package com.etc.sfts.controller;

import com.etc.sfts.biz.OrderBiz;
import com.etc.sfts.dao.OrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

@Controller
public class DoOrderController {
    @Autowired
    private OrderBiz biz;

    public OrderBiz getBiz() {
        return biz;
    }

    public void setBiz(OrderBiz biz) {
        this.biz = biz;
    }

    @RequestMapping("/getOrderCount")
    public void getOrderCount(HttpServletResponse response)throws Exception{
      Long count =biz.getOrderCount();
      PrintWriter out=response.getWriter();
      out.print(count);
      out.flush();
      out.close();
    }
}
